<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.4.1.min.js"></script>
</head>
<body>
<input type="button" onclick="doGet()" value="Get">
<input type="button" onclick="doPut()" value="Put">
<h1 id="result"></h1>
<script>
    function doGet() {
        $.get("http://localhost:8080/hello", function (data) {
            $("#result").html(data)
        })
    }
    function doPut() {
        $.ajax({
            type: "put",
            url: "http://localhost:8080/hello",
            success:function (data) {
                $("#result").html(data)

            }
        });
    }
</script>
</body>
</html>